﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace 水费管理系统
{
    public partial class 设置年月 : Form
    {
        public 设置年月()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                this.Validate();
                this.设置年月BindingSource.EndEdit();
                this.设置年月TableAdapter.Update(this.dataSet1.设置年月);
                MessageBox.Show("设置成功!");
                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void 设置年月_Load(object sender, EventArgs e)
        {
            // TODO: 这行代码将数据加载到表“dataSet1.设置年月”中。您可以根据需要移动或移除它。
            this.设置年月TableAdapter.FillByYx(this.dataSet1.设置年月);

        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}